package com.stoken.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class MemberBonusList implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY) 
	private long id;
	
	@ManyToOne
	@JoinColumn(name="base_username",nullable=false)
	private MemberBaseInfo baseUsername;
	
	@Column(columnDefinition="double default 0.00")
	private double bonusBringMoney;
	
	@ManyToOne
	@JoinColumn(name="bonus_bring_username",nullable=false)
	private MemberBaseInfo bonusBringUsername;
	
	/**
	 * 1：推荐奖
	 * 2：对碰奖
	 * 3：交易奖
	 */
	@Column(nullable=false)
	private int bonusSort;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(nullable=false)
	private Date bonusBringTime;
	
	@Column(nullable=false)
	private double walletRemain;
	
	private String bonusRemark;
	
	private String bonusSpare;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public MemberBaseInfo getBaseUsername() {
		return baseUsername;
	}

	public void setBaseUsername(MemberBaseInfo baseUsername) {
		this.baseUsername = baseUsername;
	}

	public double getBonusBringMoney() {
		return bonusBringMoney;
	}

	public void setBonusBringMoney(double bonusBringMoney) {
		this.bonusBringMoney = bonusBringMoney;
	}

	public MemberBaseInfo getBonusBringUsername() {
		return bonusBringUsername;
	}

	public void setBonusBringUsername(MemberBaseInfo bonusBringUsername) {
		this.bonusBringUsername = bonusBringUsername;
	}

	public int getBonusSort() {
		return bonusSort;
	}

	public void setBonusSort(int bonusSort) {
		this.bonusSort = bonusSort;
	}

	public Date getBonusBringTime() {
		return bonusBringTime;
	}

	public void setBonusBringTime(Date bonusBringTime) {
		this.bonusBringTime = bonusBringTime;
	}

	public double getWalletRemain() {
		return walletRemain;
	}

	public void setWalletRemain(double walletRemain) {
		this.walletRemain = walletRemain;
	}

	public String getBonusRemark() {
		return bonusRemark;
	}

	public void setBonusRemark(String bonusRemark) {
		this.bonusRemark = bonusRemark;
	}

	public String getBonusSpare() {
		return bonusSpare;
	}

	public void setBonusSpare(String bonusSpare) {
		this.bonusSpare = bonusSpare;
	}
	
}
